﻿using System;
using System.Windows.Data;

namespace Eniux.Windows.Controls.Core.Converters
{
      public  class OpacityScaleConverter:IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {

            if (value != null)
            {
                return int.Parse(value.ToString()) / 255.0 * 100;
            }
            return value;
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
